package com.chen.springtask;


import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;

@Component
public class SpringTask {

    @Scheduled(cron = "*/1 * * * * *")
    public void teask1(){
        System.out.println(Thread.currentThread().getName()+"task--->"+ LocalDateTime.now());
    }
}
